﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace Assessment.BLL
{
    public class UtilityBLL
    {
        private readonly Assessment.DAL.DBUtility dal = new Assessment.DAL.DBUtility();

        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        public DataTable GetListByPage(string TableName, string StrGetFields, string OrderField, string StrWhere, int PageSize, int PageIndex, int OrderType, out int RecordCount)
        {
            DataSet ds = new DataSet();
            ds = dal.GetListByPage(TableName, StrGetFields, OrderField, StrWhere, PageSize, PageIndex, OrderType);
            RecordCount = Convert.ToInt32(ds.Tables[0].Rows[0][0]);
            return ds.Tables[1];
        }

    }
}
